function createXMLHttpRequest() {

var ua; //this variable is for the user agent string for the browser

if(window.XMLHttpRequest) {
    try {
      ua = new XMLHttpRequest();
    } catch(e) {
      ua = false;
    }
  } else if(window.ActiveXObject) {
    try {
      ua = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
      ua = false;
    }
  }
  return ua;
}

var req = createXMLHttpRequest();

function handleResponse() {
if(req.readyState == 4){
    var response = req.responseText;
    var update = new Array();
if(response.indexOf('||' != -1)) {
      update = response.split('||');
      document.getElementById(update[0]).innerHTML = update[1];
      document.getElementById(update[2]).innerHTML = update[3];
   alert(searchClass);
    }
  }
}

function testAjax () {
   req.open('get', './includes/ajax_func.php?do=test');
   req.onreadystatechange = handleResponse;
   req.send(null);
}